package jp.co.sn.mml.pojo.tmsksttk;

import jp.co.sn.mml.pojo.tmsst.Tmsst;
import jp.co.sn.mml.pojo.tmitem.Tmitem;

public class TmsksttkId implements java.io.Serializable { 

	//年度区分
	private Long ndNo;
	//施設コード
	private Tmsst ssCd;
	//項目コード
	private Tmitem itemCd;

	/** default constructor */
	public TmsksttkId(){

	}

	/** full constructor */
	public TmsksttkId(Long ndNo,Tmsst ssCd,Tmitem itemCd){
		this.ndNo = ndNo;
		this.ssCd = ssCd;
		this.itemCd = itemCd;
	}

	//Property accessors
	public Long getNdNo(){
		return this.ndNo;
	}

	public void setNdNo(Long ndNo){
		this.ndNo=ndNo;
	}

	public Tmsst getSsCd(){
		return this.ssCd;
	}

	public void setSsCd(Tmsst ssCd){
		this.ssCd=ssCd;
	}

	public Tmitem getItemCd(){
		return this.itemCd;
	}

	public void setItemCd(Tmitem itemCd){
		this.itemCd=itemCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmsksttkId))
			return false;

		TmsksttkId castOther = (TmsksttkId) other;

		return ((this.getNdNo() ==  castOther.getNdNo())
				||(this.getNdNo()!=null && castOther.getNdNo() !=null 
					&& castOther.getNdNo() !=null 
					&& this.getNdNo().equals(castOther.getNdNo())))
			&& ((this.getSsCd() ==  castOther.getSsCd())
				||(this.getSsCd()!=null && castOther.getSsCd() !=null 
					&& castOther.getSsCd() !=null 
					&& this.getSsCd().equals(castOther.getSsCd())))
			&& ((this.getItemCd() ==  castOther.getItemCd())
				||(this.getItemCd()!=null && castOther.getItemCd() !=null 
					&& castOther.getItemCd() !=null 
					&& this.getItemCd().equals(castOther.getItemCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getNdNo() == null ? 0 : this.getNdNo().hashCode());
		result = 37 * result
				+ (getSsCd() == null ? 0 : this.getSsCd().hashCode());
		result = 37 * result
				+ (getItemCd() == null ? 0 : this.getItemCd().hashCode());
		return result;
	}

}